package com.badger.jvm.oom;

import java.util.ArrayList;
import java.util.List;

/**
 * vm Args: -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=E:\job
 * @author liqi
 *
 */
public class HeapOOM {

    static class OOMObject {
    };

    public static void main(String[] args) {
        List<OOMObject> list = new ArrayList<>();

        for (;;) {
            list.add(new OOMObject());
        }
    }
}
